<?php
class Mediator implements MediatorInterface {
    protected $client;
    protected $db;
    protected $server;
    public function setMedia(Client $client, Db $db, Server $server)
    {
        $this->client   = $client;
        $this->db       = $db;
        $this->server   = $server;
    }

    //发送请求
    public function makeRequest() {
        return $this->server->process();
    }
    //查询数据
    public function queryData() {
        return $this->db->queryData();
    }
    //响应输出
    public function output($content) {
        return $this->client->output($content);
    }
}